import React from 'react'
import '../css/user.css'
import xm from "./xm"
import redmi from "./redmi"
import telev from "./telev"
import notebook from "./notebook"
import serve from "./serve"
import luyou from "./luyou"
import hardware from "./hardware"
import community from "./community"
import {
    BrowserRouter,
    Switch,
    Route,
    Link
} from 'react-router-dom'
class user extends React.Component {
    constructor(props) {
        super(props)
        
    }
   
    render() {
        return (
            <BrowserRouter>
            <div className="news_container">
              <div className="news_nav">
                  <div className="news_nav_head w">
                      <ul>
                        <li>小米商城</li>
                        <li>MIUI</li>
                        <li>loT</li>
                        <li>云服务</li>
                        <li>天星数科</li>
                        <li>有品</li>
                        <li>企业团购</li>
                        <li>资质证照</li>
                        <li>协议规则</li>
                        <li>下载app</li>
                        <li>智能生活</li>
                    </ul>
                    <ol>
                        <li onClick={()=>{
                            this.props.history.push({
                                pathname:"/login"
                            })
                        }}>登录</li>
                        <li onClick={()=>{
                            this.props.history.push({
                                pathname:"/register"
                            })
                        }}>注册</li>
                        <li>消息通知</li>
                    </ol>
                  </div>
                   
              </div>
              <div className=" news_nav_con w">
                        <img src="./img/logo.png"/>
                        <div className="news_nav_con_li">
                            <div>小米手机</div>
                            <div>Redmi 红米</div>
                            <div>电视</div>
                            <div>笔记本</div>
                            <div>家电</div>
                            <div>路由器</div>
                            <div>智能硬件</div>
                            <div>服务</div>
                            <div>社区</div>
                        </div>
                        <input type="text" className="news_nav_con_ipt" placeholder="小米手机"></input>
                    </div>
               <div className=" news_nav_bot w">
                        <div className="news_nav_con_li">
                            <div><Link to="/">公司简介</Link></div>
                            <div><Link to="/redmi">管理团队</Link></div>
                            <div><Link to="/telev">小米文化</Link></div>
                            <div><Link to="/notebook">发展经历</Link></div>
                            <div><Link to="/serve">小米新闻</Link></div>
                            <div><Link to="/luyou">加入小米</Link></div>
                            <div><Link to="/hardware">投资者关系</Link></div>
                            <div><Link to="/community">联系我们</Link></div>
                        </div>
                    </div>
                    <div className=" w">
                        <Switch>
                            
                            <Route path="/redmi" component={redmi}></Route>
                            <Route path="/telev" component={telev}></Route>
                            <Route path="/notebook" component={notebook}></Route>
                            <Route path="/serve" component={serve}></Route>
                            <Route path="/luyou" component={luyou}></Route>
                            <Route path="/hardware" component={hardware}></Route>
                            <Route path="/community" component={community}></Route>
                            <Route path="/" component={xm}></Route>
                        </Switch>
                    </div>
                   
            </div>
             </BrowserRouter>
        )
    }
}

export default user;